//	--------------------------------------------------------------------
//	Copyright(C) 2006,2007 Zhao Yukun. All rights reserved.
//	This file is a part of the Xeres system.
//	Xeres 2007
//	Contact : xeres.engine@gmail.com
//	$(reservedInfo)
//	$(reservedDeclaration)
//	--------------------------------------------------------------------
///	@file	<CShaderAdapter9.cpp>
///	@path	~/src/graphics/dx9/
///	@date	2008/12/29
///	@desc	.

#include "config/config.h"

#include "graphics/IGeometry.h"
#include "graphics/ITechnique.h"
#include "graphics/dx9/CShaderAdapter9.h"

namespace xeres {

	IMPL_IOBJECT_CLASS( CShaderAdapter9 );
	
	// CShaderAdapter9
	CShaderAdapter9::CShaderAdapter9( RefWeak<IShader> shader )
		: m_shader( shader )
	{
	}
	// ~CShaderAdapter9
	CShaderAdapter9::~CShaderAdapter9( void )
	{
	}
	// AdaptShader
	RefWeak<IShader> CShaderAdapter9::AdaptShader( RenderContext& rc )
	{
		return m_shader;
	}
	// AssembleShader
	void CShaderAdapter9::AssembleShader( RenderContext& rc )
	{
		// nothing
	}
	// Draw
	void CShaderAdapter9::Draw( RenderContext& rc , RefWeak<IGeometry> geo )
	{
		m_shader->Draw( rc , geo );
	}

} // namespace xeres
